﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Entities
{
    /// <summary>
    /// Represents alls information about User
    /// </summary>
    public class User
    {
        #region Variable Private
        private int _userID;
        private string _userName;
        private string _password;
        private string _email;
        private DateTime _lastLogin;
        private DateTime _createdDate;
        private byte _roleID;
        private bool _IsActive;
        private bool _IsBan;
        private string _roleName;

        #endregion

        #region Properties Public
        public int UserID
        {
            get { return _userID; }
            set { _userID = value; }
        }
        public string UserName
        {
            get { return _userName; }
            set { _userName = value; }
        }
        public string Password
        {
            get { return _password; }
            set { _password = value; }
        }
        public string Email
        {
            get { return _email; }
            set { _email = value; }
        }
        public DateTime LastLogin
        {
            get { return _lastLogin; }
            set { _lastLogin = value; }
        }
        public DateTime CreatedDate
        {
            get { return _createdDate; }
            set { _createdDate = value; }
        }
        public byte RoleID
        {
            get { return _roleID; }
            set { _roleID = value; }
        }
        public bool IsActive
        {
            get { return _IsActive; }
            set { _IsActive = value; }
        }

        public bool IsBan
        {
            get { return _IsBan; }
            set { _IsBan = value; }
        }
        public string RoleName
        {
            get { return _roleName; }
            set { _roleName = value; }
        }
        #endregion

        #region Constructor
        public User() { }
        public User(string userName, string password, string email, DateTime lastLogin, DateTime createDate, byte roleId, bool isActive, bool isBan)
        {
            this.UserName = userName;
            this.Password = password;
            this.Email = email;
            this.LastLogin = lastLogin;
            this.CreatedDate = createDate;
            this.RoleID = roleId;
            this.IsActive = isActive;
            this.IsBan = isBan;
        }
        public User(int userId, string userName, string password, string email, DateTime lastLogin, DateTime createDate, byte roleId, bool isActive, bool isBan)
        {
            this.UserID = userId;
            this.UserName = userName;
            this.Password = password;
            this.Email = email;
            this.LastLogin = lastLogin;
            this.CreatedDate = createDate;
            this.RoleID = roleId;
            this.IsActive = IsActive;
            this.IsBan = isBan;
        }
        #endregion
    }
}
